using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DealerPlatform.Common.Md5Module;
using DealerPlatform.Domain;
using DealerPlatform.Service.CustomerApp.Dto;

namespace DealerPlatform.Service.CustomerApp
{
    public partial class CustomerService
    {
        public async Task<bool> CheckPassword(CustomerLoginDto dto)
        {
            CustomerPwd pwd = await RepoCustomerPwd.GetAsync(c => c.CustomerNo == dto.CustomerNo && c.CustomerPwd1 == dto.Password.ToMd5());
            return pwd != null;
        }
    }
}